package com.gw.detail.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gw.detail.domain.Crashper;
import com.gw.detail.mapper.CrashperMapper;
import com.gw.detail.service.ICrashperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 乘员运动Service业务层处理
 *
 * @author WangBin
 * @date 2021-04-30
 */
@Service
public class CrashperServiceImpl extends ServiceImpl<CrashperMapper, Crashper> implements ICrashperService {
    @Autowired
    private CrashperMapper crashperMapper;

    /**
     * 查询乘员运动
     *
     * @param id 乘员运动ID
     * @return 乘员运动
     */
    @Override
    public Crashper selectCrashperById(Long id) {
        return crashperMapper.selectCrashperById(id);
    }

    /**
     * 查询乘员运动列表
     *
     * @param crashper 乘员运动
     * @return 乘员运动
     */
    @Override
    public List<Crashper> selectCrashperList(Crashper crashper) {
        return crashperMapper.selectCrashperList(crashper);
    }

    /**
     * 新增乘员运动
     *
     * @param crashper 乘员运动
     * @return 结果
     */
    @Override
    public int insertCrashper(Crashper crashper) {
        return crashperMapper.insertCrashper(crashper);
    }

    /**
     * 修改乘员运动
     *
     * @param crashper 乘员运动
     * @return 结果
     */
    @Override
    public int updateCrashper(Crashper crashper) {
        return crashperMapper.updateCrashper(crashper);
    }

    /**
     * 批量删除乘员运动
     *
     * @param ids 需要删除的乘员运动ID
     * @return 结果
     */
    @Override
    public int deleteCrashperByIds(Long[] ids) {
        return crashperMapper.deleteCrashperByIds(ids);
    }

    /**
     * 删除乘员运动信息
     *
     * @param id 乘员运动ID
     * @return 结果
     */
    @Override
    public int deleteCrashperById(Long id) {
        return crashperMapper.deleteCrashperById(id);
    }
}
